//3:定义一个长度为100的数组，放入1000以后的100个质数
package ZUOYE0424;

public class Task3 {

	public static void main(String[] args) {
		int num[] = new int[100];
		int c = 0;
		boolean d = true;
		for (int a = 1000; c < num.length; a++) {
			for (int b = 2; b * b <= a; b++) {
				if (a % b == 0) {
					d = false;
					break;
				}
			}
			if (d == true) {
				num[c] = a;
				System.out.println("第" + (c + 1) + "个质数为" + num[c]);
				c++;
			}
			d = true;
		}
	}

}
